The Binary Tree Roll Operation: Definition, Explanation and Algorithm
نویسندگان
چکیده
The paper introduces an operation on a binary tree, called binary tree roll, or roll of a binary tree. Two versions of the binary tree roll, counterclockwise and clockwise, are presented. The operations are mathematically defined and graphically presented. It is explained how the binary tree roll actually coincides with the process of turning the entire tree 90 degrees counterclockwise or clockwise. To visually explain and perform the roll operation, the concepts of a wedge node, true ancestor, illusory ancestor, illusory root and illusory ancestral stem of nodes are introduced, as well as the visual operations of turning and downshift. Both roll operations are implemented using programming algorithms. The algorithms are explained, and all the situations that might be encountered during processing the roll operation are examined and resolved. Thus, the paper gives a mathematical introduction of both binary tree roll operations, gives their visual explanations and offers algorithms for their implementations using a computer.
منابع مشابه
An improved algorithm to reconstruct a binary tree from its inorder and postorder traversals
It is well-known that, given inorder traversal along with one of the preorder or postorder traversals of a binary tree, the tree can be determined uniquely. Several algorithms have been proposed to reconstruct a binary tree from its inorder and preorder traversals. There is one study to reconstruct a binary tree from its inorder and postorder traversals, and this algorithm takes running time of...
متن کاملA novel algorithm to determine the leaf (leaves) of a binary tree from its preorder and postorder traversals
Binary trees are essential structures in Computer Science. The leaf (leaves) of a binary tree is one of the most significant aspects of it. In this study, we prove that the order of a leaf (leaves) of a binary tree is the same in the main tree traversals; preorder, inorder, and postorder. Then, we prove that given the preorder and postorder traversals of a binary tree, the leaf (leaves) of a bi...
متن کاملAn improved algorithm to reconstruct a binary tree from its inorder and postorder traversals
It is well-known that, given inorder traversal along with one of the preorder or postorder traversals of a binary tree, the tree can be determined uniquely. Several algorithms have been proposed to reconstruct a binary tree from its inorder and preorder traversals. There is one study to reconstruct a binary tree from its inorder and postorder traversals, and this algorithm takes running time of...
متن کاملA New Heuristic Algorithm for Drawing Binary Trees within Arbitrary Polygons Based on Center of Gravity
Graphs have enormous usage in software engineering, network and electrical engineering. In fact graphs drawing is a geometrically representation of information. Among graphs, trees are concentrated because of their ability in hierarchical extension as well as processing VLSI circuit. Many algorithms have been proposed for drawing binary trees within polygons. However these algorithms generate b...
متن کاملEnhancing Rollover Threshold of an Elliptical Container Based on Binary-coded Genetic Algorithm
In this paper, a method based on binary-coded genetic algorithm is proposed to explore an optimization method, for obtaining an optimal elliptical tank. This optimization method enhances the rollover threshold of a tank vehicle, especially under partial filling conditions. Minimizing the overturning moment imposed on the vehicle due to c.g. height of the liquid load, lateral acceleration and ca...
متن کامل